/*
 * @Author: Sam
 * @Date: 2020-10-12 15:24:53
 * @LastEditTime: 2020-10-19 13:08:31
 * @LastEditors: Sam
 * @Description: 
 * @FilePath: \thework\ygboost-eui\src\store\yg\page\edit\actions.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
import * as types from './mutation-types'

export default {
  toggleModal({ commit }, link) {
    commit(types.TOGGLE_MODAL, link);
  },
  closeModal({ commit }) {
    commit(types.CLOSE_MODAL);
  },
  pageClicked({ commit }, bool) {
    commit(types.PAGE_CLICKED, bool);
  },
  saveEditId({ commit }, id) {
    commit(types.SAVE_EDIT_ID, id);
  },
  confirmCloseModal({ commit }) {
    commit(types.CONFIRM_CLOSE_MODAL);
  },
  saveEditResponse({ commit }, res) {
    commit(types.SAVE_EDIT_RESPONSE, res);
  },
  cancelCloseModel({ commit }) {
    commit(types.CANCEL_CLOSE_MODAL);
  },
  loadEditEntry({ commit }, link) {
    commit(types.LOAD_EDIT_ENTRY, link);
  },
  loadEditRow({ commit }, link) {
    commit(types.LOAD_EDIT_ROW, link);
  },
  saveEditRow({ commit }, action) {
    commit(types.SAVE_EDIT_ROW, action);
  },
  emptyEditRow({ commit }) {
    commit(types.EMPTY_EDIT_ROW);
  },
  saveEditHtml({ commit }, html) {
    commit(types.SAVE_EDIT_HTML, html);
  },
  saveEditEntry({ commit }, entry) {
    commit(types.SAVE_EDIT_ENTRY, entry);
  },
  commitError({ commit }, errMsg) {
    commit(types.COMMIT_ERROR, errMsg);
  },
  commitEditAction({ commit }, uri, id) {
    commit(types.COMMIT_EDIT_ACTION, uri, id);
  },
  loadEditOptionSource({ commit }, option) {
    commit(types.LOAD_EDIT_OPTION_SOURCE, option);
  },
  
};
